package com.maybach.core.manager;

import com.maybach.util.query.support.PageResult;
import com.maybach.common.model.IdentifyDO;
import com.maybach.common.query.IdentifyQuery;

import java.util.List;


/**
 * Manager for Identify.
 */
public interface IdentifyManager {
    /**
     * query count by query condition.
     */
    int countByQuery(IdentifyQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(IdentifyQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(IdentifyDO record);

    /**
     * insert selective.
     */
    long insertSelective(IdentifyDO record);

    /**
     * select by query condition.
     */
    List<IdentifyDO> selectByQuery(IdentifyQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<IdentifyDO> selectByQueryWithPage(IdentifyQuery query);

    /**
     * select by primary key.
     */
    IdentifyDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( IdentifyDO record,  IdentifyQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(IdentifyDO record, IdentifyQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(IdentifyDO record);

    /**
     * 创建并返回identify
     * @param code
     * @return
     */
    Long createAndGetIdentify(String code);
}